package packet;

import shared.Consts.Priorities;
import client.ClientController;

/**
 *
 * @author Joel Garboden
 */
public class PlayerJoinCmd extends Command
{
  /**
   *
   * @param playerID
   */
  public PlayerJoinCmd(int playerID)
  {
    this.playerID = playerID;
    this.priority = Priorities.URGENT;
  }

  @Override
  public boolean execCommand(ClientController client)
  {
    client.setPlayerID(playerID);
    client.nameRequest(playerID);
    return true;
  }

  @Override
  public String toString()
  {
    return "playerJoinCmd: " + playerID;
  }
}
